<template>
  <div class="card">
    <a-button style="margin-bottom: 20px" type="primary">下发大盘分红</a-button>
    <a-spin :spinning="loading">
      <a-table
        :row-selection="rowSelection"
        bordered
        :columns="columns"
        :data-source="data"
        :rowKey="(record, index) => index"
        :pagination="false"
      >
        <span slot="operate" slot-scope="text, record">
          <a-button :disabled="record.status == 0 ? false : true" type="primary" @click="issue(record.id)"> </a-button>
        </span>
      </a-table>
    </a-spin>
  </div>
</template>

<script>
export default {
  name: 'Large-capdividend',
  computed: {
    rowSelection() {
      const { selectedRowKeys } = this
      return {
        selectedRowKeys,
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys
          this.select_rows = selectedRows
        },
        getCheckboxProps: record => ({
          props: {
            disabled: record.status == '1'
          }
        })
      }
    }
  },
  data() {
    return {
      select_rows: [],
      selectedRowKeys: [],
      loading: false,
      data: [],
      columns: [
        {
          title: '收益用户',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '收益用户手机号',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '收益',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '状态',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '类型',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '日期',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '分红时间',
          dataIndex: '',
          align: 'center'
        },
        {
          title: '操作',
          align: 'center',
          scopedSlots: { customRender: 'operate' }
        }
      ]
    }
  }
}
</script>

<style lang="less" scoped>
.card {
  padding: 20px;
  background-color: #fff;
}
</style>
